package com.shj.em.biz.finance.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shj.em.base.entity.BaseEntity;


import com.shj.em.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 开票信息
 * </p>
 *
 * @author Shen Huang Jian
 * @since 2018-07-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oa_order_receipt")
public class Receipt extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long orderId;

    /**
     * 开票日期
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date receiptDt;

    /**
     * 发票号
     */
    private String receiptNo;

    /**
     * 开票公司
     */
    private String company;

    /**
     * 金额
     */
    private BigDecimal amount;

    private String remark;


    public String getAmountStr(){
        return StringUtils.convertAmount2String(amount, 2);
    }

}
